import http from '@/utils/request'


// 新增定时任务调度表
export const insertBatchJob = (system,params) => {
    return http.post("/"+system+"/batchJob/insert", params);
};

// 删除定时任务调度表
export const deleteBatchJob = (system,id) => {
    return http.delete("/"+system+"/batchJob/delete",{id:id});
};

// 修改定时任务调度表
export const updateBatchJob = (system,params) => {
    return http.post("/"+system+"/batchJob/update", params);
};

// 根据Id获取定时任务调度表
export const getBatchJobById = (system,id) => {
    return http.get("/"+system+"/batchJob/selectById", { id: id });
};

// 分页查询定时任务调度表
export const getBatchJobList = (system,params) => {
    return http.post("/"+system+"/batchJob/pageQuery", params);
};

// 解析Cron表达式
export const cronParser = (cron) => {
    return http.post("/admin-batch/batchJob/cronParser", { cron: cron,times:"100" });
};
